package com.cqhfan.core.utils;

import com.cqhfan.core.domain.dto.UserAuthDTO;

/**
 * @author 眭传洪
 * @create 2025-07-26 0:53
 */
public class AuthContextHolder {

    private static final ThreadLocal<UserAuthDTO> TL = new ThreadLocal<>();

    public static void setAuthInfo(UserAuthDTO userAuthDTO) {
        TL.set(userAuthDTO);
    }

    public static void removeAuthInfo() {
        TL.remove();
    }

    public static UserAuthDTO getAuthInfo() {
        return TL.get();
    }

}
